Calculating Efficiency of the Internal Temperature Degrees for Medical Laboratories in The Regional Laboratory and Central Blood Bank. Finding a Relationship between Temperature Degrees as 'Independent Variable', Efficiency Rates and Quality as 'Dependent Variable'.
__author__ = "Abdulaziz Alsulami"
__date__ = '2020-Aug'
__email__ = "engaziz02@gmail.com"
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import plotly.express as px
plt.style.use('fivethirtyeight')
%matplotlib inline
lab_df = pd.read_csv('own_project.csv', sep=';')
print('Data')
lab_df
Data
| No of Devices | Floor Name | Temperature Degree | Room | Lab Name | |
|---|---|---|---|---|---|
| 0 | 6 | GF | 28.30 | 1 | Blood Bank |
| 1 | 5 | GF | 27.55 | 2 | Blood Bank |
| 2 | 4 | GF | 28.42 | 3 | Blood Bank |
| 3 | 5 | GF | 26.81 | 4 | Blood Bank |
| 4 | 3 | GF | 25.60 | 5 | Blood Bank |
| 5 | 6 | GF | 28.07 | 1 | Nucleic Acid Testing |
| 6 | 4 | FF | 28.24 | 1 | Polymerase Chain Reaction |
| 7 | 7 | FF | 29.15 | 2 | Polymerase Chain Reaction |
| 8 | 5 | FF | 28.29 | 3 | Polymerase Chain Reaction |
| 9 | 5 | FF | 27.65 | 4 | Polymerase Chain Reaction |
| 10 | 3 | FF | 24.35 | 5 | Polymerase Chain Reaction |
| 11 | 3 | FF | 26.93 | 6 | Polymerase Chain Reaction |
| 12 | 8 | FF | 27.04 | 1 | Serology |
| 13 | 2 | FF | 26.06 | 1 | immunology |
| 14 | 6 | FF | 23.12 | 1 | Water chemistry |
| 15 | 5 | FF | 26.06 | 1 | Microbiology |
| 16 | 2 | FF | 22.18 | 1 | Parasites |
| 17 | 3 | FF | 24.78 | 1 | Hematology |
| 18 | 5 | FF | 26.34 | 1 | Chemistry |
print('Rows Count: ',lab_df.shape[0])
print('Columns Count: ',lab_df.shape[1])
Rows Count: 19 Columns Count: 5
print('Column_Name ','Data_Type')
lab_df.dtypes
Column_Name Data_Type
No of Devices int64 Floor Name object Temperature Degree float64 Room int64 Lab Name object dtype: object
lab_df = lab_df.reindex(columns = ['Lab Name','Room','Floor Name','No of Devices','Temperature Degree'])
print('Data after Rearrange the Columns:')
lab_df
Data after Rearrange the Columns:
| Lab Name | Room | Floor Name | No of Devices | Temperature Degree | |
|---|---|---|---|---|---|
| 0 | Blood Bank | 1 | GF | 6 | 28.30 |
| 1 | Blood Bank | 2 | GF | 5 | 27.55 |
| 2 | Blood Bank | 3 | GF | 4 | 28.42 |
| 3 | Blood Bank | 4 | GF | 5 | 26.81 |
| 4 | Blood Bank | 5 | GF | 3 | 25.60 |
| 5 | Nucleic Acid Testing | 1 | GF | 6 | 28.07 |
| 6 | Polymerase Chain Reaction | 1 | FF | 4 | 28.24 |
| 7 | Polymerase Chain Reaction | 2 | FF | 7 | 29.15 |
| 8 | Polymerase Chain Reaction | 3 | FF | 5 | 28.29 |
| 9 | Polymerase Chain Reaction | 4 | FF | 5 | 27.65 |
| 10 | Polymerase Chain Reaction | 5 | FF | 3 | 24.35 |
| 11 | Polymerase Chain Reaction | 6 | FF | 3 | 26.93 |
| 12 | Serology | 1 | FF | 8 | 27.04 |
| 13 | immunology | 1 | FF | 2 | 26.06 |
| 14 | Water chemistry | 1 | FF | 6 | 23.12 |
| 15 | Microbiology | 1 | FF | 5 | 26.06 |
| 16 | Parasites | 1 | FF | 2 | 22.18 |
| 17 | Hematology | 1 | FF | 3 | 24.78 |
| 18 | Chemistry | 1 | FF | 5 | 26.34 |
lab_df = lab_df.rename(columns={
'Lab Name':'LabName',
'Room':'Room',
'Floor Name':'Floor',
'Temperature Degree':'TemperatureDegree',
'No of Devices':'DevicesNumber'
})
print('Data After Rename The Columns:')
lab_df
Data After Rename The Columns:
| LabName | Room | Floor | DevicesNumber | TemperatureDegree | |
|---|---|---|---|---|---|
| 0 | Blood Bank | 1 | GF | 6 | 28.30 |
| 1 | Blood Bank | 2 | GF | 5 | 27.55 |
| 2 | Blood Bank | 3 | GF | 4 | 28.42 |
| 3 | Blood Bank | 4 | GF | 5 | 26.81 |
| 4 | Blood Bank | 5 | GF | 3 | 25.60 |
| 5 | Nucleic Acid Testing | 1 | GF | 6 | 28.07 |
| 6 | Polymerase Chain Reaction | 1 | FF | 4 | 28.24 |
| 7 | Polymerase Chain Reaction | 2 | FF | 7 | 29.15 |
| 8 | Polymerase Chain Reaction | 3 | FF | 5 | 28.29 |
| 9 | Polymerase Chain Reaction | 4 | FF | 5 | 27.65 |
| 10 | Polymerase Chain Reaction | 5 | FF | 3 | 24.35 |
| 11 | Polymerase Chain Reaction | 6 | FF | 3 | 26.93 |
| 12 | Serology | 1 | FF | 8 | 27.04 |
| 13 | immunology | 1 | FF | 2 | 26.06 |
| 14 | Water chemistry | 1 | FF | 6 | 23.12 |
| 15 | Microbiology | 1 | FF | 5 | 26.06 |
| 16 | Parasites | 1 | FF | 2 | 22.18 |
| 17 | Hematology | 1 | FF | 3 | 24.78 |
| 18 | Chemistry | 1 | FF | 5 | 26.34 |
Set Ideal, Actual and Breakdown Temperature Degrees as well as create a Formula for calculating Actual Efficiency
# All Temperature Degree in Celsius.
# Ideal Tempreture Degree
ideal_temp_deg = 22
# Actual Tempreture Degrees
actual_temp_deg = lab_df['TemperatureDegree']
# Ideal Efficincy percent
ideal_eff = 100
# one Temperature Degree Equal 10 percent from Efficiency
one_deg = 10
# Actual Efficiency percent
actual_eff = ideal_eff -(actual_temp_deg -ideal_temp_deg)* one_deg
# Breakdown Tempreture Degree
Break_temp_deg = ideal_temp_deg + 10
def calculating_actual_efficiency(x):
'''returns to efficiency rate of x'''
ideal_eff = 100
ideal_temp_deg = 22
one_deg = 10
actual_temp_deg = x
actual_eff = ideal_eff - (actual_temp_deg -ideal_temp_deg)* one_deg
return round(actual_eff,2)
lab_df['Efficiency'] = calculating_actual_efficiency(lab_df['TemperatureDegree'])
print('Data with Efficiency column: ')
lab_df
Data with Efficiency column:
| LabName | Room | Floor | DevicesNumber | TemperatureDegree | Efficiency | |
|---|---|---|---|---|---|---|
| 0 | Blood Bank | 1 | GF | 6 | 28.30 | 37.0 |
| 1 | Blood Bank | 2 | GF | 5 | 27.55 | 44.5 |
| 2 | Blood Bank | 3 | GF | 4 | 28.42 | 35.8 |
| 3 | Blood Bank | 4 | GF | 5 | 26.81 | 51.9 |
| 4 | Blood Bank | 5 | GF | 3 | 25.60 | 64.0 |
| 5 | Nucleic Acid Testing | 1 | GF | 6 | 28.07 | 39.3 |
| 6 | Polymerase Chain Reaction | 1 | FF | 4 | 28.24 | 37.6 |
| 7 | Polymerase Chain Reaction | 2 | FF | 7 | 29.15 | 28.5 |
| 8 | Polymerase Chain Reaction | 3 | FF | 5 | 28.29 | 37.1 |
| 9 | Polymerase Chain Reaction | 4 | FF | 5 | 27.65 | 43.5 |
| 10 | Polymerase Chain Reaction | 5 | FF | 3 | 24.35 | 76.5 |
| 11 | Polymerase Chain Reaction | 6 | FF | 3 | 26.93 | 50.7 |
| 12 | Serology | 1 | FF | 8 | 27.04 | 49.6 |
| 13 | immunology | 1 | FF | 2 | 26.06 | 59.4 |
| 14 | Water chemistry | 1 | FF | 6 | 23.12 | 88.8 |
| 15 | Microbiology | 1 | FF | 5 | 26.06 | 59.4 |
| 16 | Parasites | 1 | FF | 2 | 22.18 | 98.2 |
| 17 | Hematology | 1 | FF | 3 | 24.78 | 72.2 |
| 18 | Chemistry | 1 | FF | 5 | 26.34 | 56.6 |
lab_name_index = lab_df.groupby(by=['LabName']).mean()
print('Indexing the data by Lab Name column: ')
round(lab_name_index,2)
Indexing the data by Lab Name column:
| Room | DevicesNumber | TemperatureDegree | Efficiency | |
|---|---|---|---|---|
| LabName | ||||
| Blood Bank | 3.0 | 4.6 | 27.34 | 46.64 |
| Chemistry | 1.0 | 5.0 | 26.34 | 56.60 |
| Hematology | 1.0 | 3.0 | 24.78 | 72.20 |
| Microbiology | 1.0 | 5.0 | 26.06 | 59.40 |
| Nucleic Acid Testing | 1.0 | 6.0 | 28.07 | 39.30 |
| Parasites | 1.0 | 2.0 | 22.18 | 98.20 |
| Polymerase Chain Reaction | 3.5 | 4.5 | 27.44 | 45.65 |
| Serology | 1.0 | 8.0 | 27.04 | 49.60 |
| Water chemistry | 1.0 | 6.0 | 23.12 | 88.80 |
| immunology | 1.0 | 2.0 | 26.06 | 59.40 |
criteria_1 = lab_df['Efficiency'] >= 70
crit_1 = lab_df[criteria_1][['LabName','Efficiency','Room']].sort_values('Efficiency',ascending=False).reset_index(drop=True)
answer = '''{0} laboratories.
{1} laboratory has the highest Efficiency. '''
print(answer.format(len(crit_1),crit_1.LabName.iloc[0]))
crit_1
4 laboratories. Parasites laboratory has the highest Efficiency.
| LabName | Efficiency | Room | |
|---|---|---|---|
| 0 | Parasites | 98.2 | 1 |
| 1 | Water chemistry | 88.8 | 1 |
| 2 | Polymerase Chain Reaction | 76.5 | 5 |
| 3 | Hematology | 72.2 | 1 |
criteria_2 = lab_df['Efficiency'] < 70
crit_2 = lab_df[criteria_2][['LabName','Efficiency','Room']].sort_values('Efficiency').reset_index(drop=True)
answer = '''{0} laboratories.
Room {1} at {2} laboratory has the lowest Efficiency. '''
print(answer.format(len(crit_2), crit_2.Room[0],crit_2.LabName[0]))
crit_2
15 laboratories. Room 2 at Polymerase Chain Reaction laboratory has the lowest Efficiency.
| LabName | Efficiency | Room | |
|---|---|---|---|
| 0 | Polymerase Chain Reaction | 28.5 | 2 |
| 1 | Blood Bank | 35.8 | 3 |
| 2 | Blood Bank | 37.0 | 1 |
| 3 | Polymerase Chain Reaction | 37.1 | 3 |
| 4 | Polymerase Chain Reaction | 37.6 | 1 |
| 5 | Nucleic Acid Testing | 39.3 | 1 |
| 6 | Polymerase Chain Reaction | 43.5 | 4 |
| 7 | Blood Bank | 44.5 | 2 |
| 8 | Serology | 49.6 | 1 |
| 9 | Polymerase Chain Reaction | 50.7 | 6 |
| 10 | Blood Bank | 51.9 | 4 |
| 11 | Chemistry | 56.6 | 1 |
| 12 | immunology | 59.4 | 1 |
| 13 | Microbiology | 59.4 | 1 |
| 14 | Blood Bank | 64.0 | 5 |
criteria_2 = lab_df['TemperatureDegree'] <= 25
crit_2 = lab_df[criteria_2][['LabName','TemperatureDegree']].sort_values(by='TemperatureDegree')
answer = '''{0} laboratories: '''
print(answer.format(len(crit_2)))
crit_2
4 laboratories:
| LabName | TemperatureDegree | |
|---|---|---|
| 16 | Parasites | 22.18 |
| 14 | Water chemistry | 23.12 |
| 10 | Polymerase Chain Reaction | 24.35 |
| 17 | Hematology | 24.78 |
criteria_3 = lab_df['TemperatureDegree'] > 25
crit_3 = lab_df[criteria_3][['LabName','TemperatureDegree']].sort_values(by='TemperatureDegree')
answer = '''{0} laboratories:'''
print(answer.format(len(crit_3)))
crit_3
15 laboratories:
| LabName | TemperatureDegree | |
|---|---|---|
| 4 | Blood Bank | 25.60 |
| 13 | immunology | 26.06 |
| 15 | Microbiology | 26.06 |
| 18 | Chemistry | 26.34 |
| 3 | Blood Bank | 26.81 |
| 11 | Polymerase Chain Reaction | 26.93 |
| 12 | Serology | 27.04 |
| 1 | Blood Bank | 27.55 |
| 9 | Polymerase Chain Reaction | 27.65 |
| 5 | Nucleic Acid Testing | 28.07 |
| 6 | Polymerase Chain Reaction | 28.24 |
| 8 | Polymerase Chain Reaction | 28.29 |
| 0 | Blood Bank | 28.30 |
| 2 | Blood Bank | 28.42 |
| 7 | Polymerase Chain Reaction | 29.15 |
lab_df['Quality'] = np.where(criteria_1, 'Good', 'Bad')
lab_df
| LabName | Room | Floor | DevicesNumber | TemperatureDegree | Efficiency | Quality | |
|---|---|---|---|---|---|---|---|
| 0 | Blood Bank | 1 | GF | 6 | 28.30 | 37.0 | Bad |
| 1 | Blood Bank | 2 | GF | 5 | 27.55 | 44.5 | Bad |
| 2 | Blood Bank | 3 | GF | 4 | 28.42 | 35.8 | Bad |
| 3 | Blood Bank | 4 | GF | 5 | 26.81 | 51.9 | Bad |
| 4 | Blood Bank | 5 | GF | 3 | 25.60 | 64.0 | Bad |
| 5 | Nucleic Acid Testing | 1 | GF | 6 | 28.07 | 39.3 | Bad |
| 6 | Polymerase Chain Reaction | 1 | FF | 4 | 28.24 | 37.6 | Bad |
| 7 | Polymerase Chain Reaction | 2 | FF | 7 | 29.15 | 28.5 | Bad |
| 8 | Polymerase Chain Reaction | 3 | FF | 5 | 28.29 | 37.1 | Bad |
| 9 | Polymerase Chain Reaction | 4 | FF | 5 | 27.65 | 43.5 | Bad |
| 10 | Polymerase Chain Reaction | 5 | FF | 3 | 24.35 | 76.5 | Good |
| 11 | Polymerase Chain Reaction | 6 | FF | 3 | 26.93 | 50.7 | Bad |
| 12 | Serology | 1 | FF | 8 | 27.04 | 49.6 | Bad |
| 13 | immunology | 1 | FF | 2 | 26.06 | 59.4 | Bad |
| 14 | Water chemistry | 1 | FF | 6 | 23.12 | 88.8 | Good |
| 15 | Microbiology | 1 | FF | 5 | 26.06 | 59.4 | Bad |
| 16 | Parasites | 1 | FF | 2 | 22.18 | 98.2 | Good |
| 17 | Hematology | 1 | FF | 3 | 24.78 | 72.2 | Good |
| 18 | Chemistry | 1 | FF | 5 | 26.34 | 56.6 | Bad |
stat_temp_eff = lab_df.describe()
stat_temp_eff = pd.DataFrame(round(stat_temp_eff,2)).transpose()
stat_temp_eff['IQR'] = stat_temp_eff['75%'] - stat_temp_eff['25%']
stat_temp_eff
| count | mean | std | min | 25% | 50% | 75% | max | IQR | |
|---|---|---|---|---|---|---|---|---|---|
| Room | 19.0 | 2.32 | 1.70 | 1.00 | 1.00 | 1.00 | 3.50 | 6.00 | 2.50 |
| DevicesNumber | 19.0 | 4.58 | 1.64 | 2.00 | 3.00 | 5.00 | 5.50 | 8.00 | 2.50 |
| TemperatureDegree | 19.0 | 26.58 | 1.89 | 22.18 | 25.83 | 26.93 | 28.16 | 29.15 | 2.33 |
| Efficiency | 19.0 | 54.24 | 18.92 | 28.50 | 38.45 | 50.70 | 61.70 | 98.20 | 23.25 |
lab_df.describe(include=['O']).transpose()
| count | unique | top | freq | |
|---|---|---|---|---|
| LabName | 19 | 10 | Polymerase Chain Reaction | 6 |
| Floor | 19 | 2 | FF | 13 |
| Quality | 19 | 2 | Bad | 15 |
def mean(x):
'''returns to the average value'''
return sum(x) / len(x)
print('The Temperature Degrees average: ', round(mean(lab_df['TemperatureDegree']), 2), 'C')
print('The Efficiecny average: ', round(mean(lab_df['Efficiency']), 2), '%')
The Temperature Degrees average: 26.58 C The Efficiecny average: 54.24 %
def median(x):
'''returns to the middel value '''
x = sorted(x)
n = len(x)
medpoint = n // 2
if n % 2 ==1:
return x[medpoint]
else:
low= medpoint -1
high= medpoint
return (x[high] + x[low]) // 2
print('The Middle value of Tempreture Degrees: ', median(lab_df['TemperatureDegree']), 'C')
print('The Middle value of Efficiency : ', median(lab_df['Efficiency']), ' %')
The Middle value of Tempreture Degrees: 26.93 C The Middle value of Efficiency : 50.7 %
from collections import Counter
def mode(x):
'''returns to the most common values'''
counts = Counter(x)
max_counts = max(counts.values())
return [key for key, val in counts.items()
if val == max_counts][0]
print('The Most Common Temperature Degree: ', mode(lab_df['TemperatureDegree']), 'C')
print('The Most Common Efficiency : ', mode(lab_df['Efficiency']), ' %')
The Most Common Temperature Degree: 26.06 C The Most Common Efficiency : 59.4 %
def min_max(temp):
'''returns to minmum and maximum values'''
return min(temp), max(temp)
print('The Minmum and Maximum Temperature Degree: ', min_max(lab_df.TemperatureDegree), 'C')
print('The Minmum and Maximum Efficiency : ', min_max(lab_df.Efficiency), ' %')
The Minmum and Maximum Temperature Degree: (22.18, 29.15) C The Minmum and Maximum Efficiency : (28.5, 98.2) %
lab_df_avg = lab_df.groupby(by='LabName').mean()
lab_df_avg['Quality'] = np.where(lab_df_avg['Efficiency'] >=70, 'Good', 'Bad')
round(lab_df_avg,2)
| Room | DevicesNumber | TemperatureDegree | Efficiency | Quality | |
|---|---|---|---|---|---|
| LabName | |||||
| Blood Bank | 3.0 | 4.6 | 27.34 | 46.64 | Bad |
| Chemistry | 1.0 | 5.0 | 26.34 | 56.60 | Bad |
| Hematology | 1.0 | 3.0 | 24.78 | 72.20 | Good |
| Microbiology | 1.0 | 5.0 | 26.06 | 59.40 | Bad |
| Nucleic Acid Testing | 1.0 | 6.0 | 28.07 | 39.30 | Bad |
| Parasites | 1.0 | 2.0 | 22.18 | 98.20 | Good |
| Polymerase Chain Reaction | 3.5 | 4.5 | 27.44 | 45.65 | Bad |
| Serology | 1.0 | 8.0 | 27.04 | 49.60 | Bad |
| Water chemistry | 1.0 | 6.0 | 23.12 | 88.80 | Good |
| immunology | 1.0 | 2.0 | 26.06 | 59.40 | Bad |
# Showing the Quality of Efficiency Rates for each Laboratory
plt.figure(figsize=(10,5))
X = lab_df_avg.index
Y = lab_df_avg.Efficiency
ax = sns.barplot(X, Y, data=lab_df_avg, hue='Quality', alpha=0.6, palette=['red','blue'])
ax.set_xticklabels(ax.get_xticklabels(),rotation=45,fontsize=12)
plt.title('Efficiency Rate for each Laboratory', fontsize=12)
plt.xlabel('Laboratory Name', fontsize=12)
plt.ylabel('Efficiency Rate', fontsize=12)
plt.legend(loc=1, fontsize='x-small')
plt.grid(True)
plt.show()
/opt/anaconda3/lib/python3.8/site-packages/seaborn/_decorators.py:36: FutureWarning: Pass the following variables as keyword args: x, y. From version 0.12, the only valid positional argument will be `data`, and passing other arguments without an explicit keyword will result in an error or misinterpretation. warnings.warn(
In the Regional Laboratory, there are 70% of laboratories assort as Bad Efficiency and 30% as Good Efficiency. If Efficiency less than 70% the Quality becomes Bad otherwise Good.
BB = lab_df[lab_df['LabName'] == 'Blood Bank'].sort_values(by='Quality', ascending=False, ignore_index=True)
BB
| LabName | Room | Floor | DevicesNumber | TemperatureDegree | Efficiency | Quality | |
|---|---|---|---|---|---|---|---|
| 0 | Blood Bank | 1 | GF | 6 | 28.30 | 37.0 | Bad |
| 1 | Blood Bank | 2 | GF | 5 | 27.55 | 44.5 | Bad |
| 2 | Blood Bank | 3 | GF | 4 | 28.42 | 35.8 | Bad |
| 3 | Blood Bank | 4 | GF | 5 | 26.81 | 51.9 | Bad |
| 4 | Blood Bank | 5 | GF | 3 | 25.60 | 64.0 | Bad |
# Showing the Quality of Efficiency Rates for Blood Bank Department
plt.figure(figsize=(8,5))
X = BB['Room']
Y = BB['Efficiency']
sns.barplot(X, Y, hue=BB['Quality'], alpha=0.6, palette=['red','blue'],)
plt.title('Blood Bank Efficiency by Room', fontsize=12)
plt.xlabel('Room', fontsize=12)
plt.ylabel('Efficiency', fontsize=12)
plt.legend(loc=2,fontsize='x-small')
plt.grid(True)
plt.show()
/opt/anaconda3/lib/python3.8/site-packages/seaborn/_decorators.py:36: FutureWarning: Pass the following variables as keyword args: x, y. From version 0.12, the only valid positional argument will be `data`, and passing other arguments without an explicit keyword will result in an error or misinterpretation. warnings.warn(
In Blood Bank , All Rooms assort as Bad Efficiency.
PCR = lab_df[lab_df['LabName'] == 'Polymerase Chain Reaction']
PCR
| LabName | Room | Floor | DevicesNumber | TemperatureDegree | Efficiency | Quality | |
|---|---|---|---|---|---|---|---|
| 6 | Polymerase Chain Reaction | 1 | FF | 4 | 28.24 | 37.6 | Bad |
| 7 | Polymerase Chain Reaction | 2 | FF | 7 | 29.15 | 28.5 | Bad |
| 8 | Polymerase Chain Reaction | 3 | FF | 5 | 28.29 | 37.1 | Bad |
| 9 | Polymerase Chain Reaction | 4 | FF | 5 | 27.65 | 43.5 | Bad |
| 10 | Polymerase Chain Reaction | 5 | FF | 3 | 24.35 | 76.5 | Good |
| 11 | Polymerase Chain Reaction | 6 | FF | 3 | 26.93 | 50.7 | Bad |
# Showing the Quality of Efficiency Rates for Polymerase Chain Reaction
plt.figure(figsize=(8,5))
PCR = lab_df[lab_df['LabName'] == 'Polymerase Chain Reaction']
X = PCR['Room']
Y = PCR['Efficiency']
ax = sns.barplot(X, Y, hue=PCR['Quality'], alpha=0.6, palette=['red','blue'])
plt.title('Polymerase Chain Reaction Efficiency by Room', fontsize=12)
plt.xlabel('Room', fontsize=12)
plt.ylabel('Efficiency', fontsize=12)
plt.legend(loc= 1, fontsize='x-small')
plt.grid(True)
plt.show()
/opt/anaconda3/lib/python3.8/site-packages/seaborn/_decorators.py:36: FutureWarning: Pass the following variables as keyword args: x, y. From version 0.12, the only valid positional argument will be `data`, and passing other arguments without an explicit keyword will result in an error or misinterpretation. warnings.warn(
In Ploymerase Chain Reaction Laboratory, there are five Rooms assort as Bad Efficiency and one as Good Efficiency.
# Encoding Quality Good value is 1 and Bad value is 0
quality_encoder = np.where(lab_df['Quality'] == 'Good', 1, 0)
quality_encoder = pd.Series(quality_encoder)
# plotting Temperature Degreee, Efficiency and quality_encoder to find the correlation between them.
data = lab_df.copy()
data['QualityEnc'] = quality_encoder
cols = ['TemperatureDegree','Efficiency','QualityEnc']
sns.pairplot(data[cols], height=2.5)
plt.show()
The graph proves the relationship between Temperature Degrees and Efficiency Rates is inversely proportional as well as most higher Degrees and lower Rates are within Bad Quality 'Zero value' while they are less within Good Quality 'One value'.
# Finding corellation for TemperatureDegree, Efficiency and QualityEnc
cm = data[cols].corr()
sns.set(font_scale=1)
sns.heatmap(data=cm,
cbar=True,
annot=True,
square=True,
fmt = '0.2f',
annot_kws={'size':15},
xticklabels=cols,
yticklabels=cols)
plt.show()
lab_df_sorted_asc = lab_df.sort_values('Efficiency',ascending=False)
lab_df[lab_df['Quality'] == 'Bad'].mean()['DevicesNumber'].round()
5.0
lab_df[lab_df['Quality'] == 'Good'].mean()['DevicesNumber'].round()
4.0
temp_eff = lab_df[['TemperatureDegree','Efficiency']].sort_values('Efficiency',ascending=False).transpose()
temp_eff
| 16 | 14 | 10 | 17 | 4 | 15 | 13 | 18 | 3 | 11 | 12 | 1 | 9 | 5 | 6 | 8 | 0 | 2 | 7 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TemperatureDegree | 22.18 | 23.12 | 24.35 | 24.78 | 25.6 | 26.06 | 26.06 | 26.34 | 26.81 | 26.93 | 27.04 | 27.55 | 27.65 | 28.07 | 28.24 | 28.29 | 28.3 | 28.42 | 29.15 |
| Efficiency | 98.20 | 88.80 | 76.50 | 72.20 | 64.0 | 59.40 | 59.40 | 56.60 | 51.90 | 50.70 | 49.60 | 44.50 | 43.50 | 39.30 | 37.60 | 37.10 | 37.0 | 35.80 | 28.50 |
fig = px.scatter(lab_df_sorted_asc, x="TemperatureDegree", y="Efficiency",
size="DevicesNumber", color="Quality", hover_name="LabName",
log_x=True, size_max=60, title='Quality of Efficiency Rate vs Temperature Degree')
fig.show()
Overall, the Efficiency Rates are decreased with increasing Temperature Degrees and when a Degree exceeds 25 C the Efficiency Rates are within Bad Rates.
plt.figure(figsize=(14,6))
fig = px.scatter(lab_df_sorted_asc, x="TemperatureDegree", y="DevicesNumber",
size="DevicesNumber", color="Quality", hover_name="LabName",
log_x=True, size_max=60, title='Quality of Efficiency Rate vs Temperature Degree')
fig.show()
<Figure size 1008x432 with 0 Axes>
# display how much laboratories have more than or equal 4 devices
lab_df[lab_df['DevicesNumber'] <=3].shape[0] / lab_df.shape[0] * 100
31.57894736842105
We can say most of laboratories have at least 4 devices or more than which represented 68% of all laboratories
f, axes = plt.subplots(ncols=2, figsize=(15,6))
X_0 = lab_df.TemperatureDegree
X_1 = lab_df.Efficiency
sns.kdeplot(X_0, shade=True, color='b', ax=axes[0]).set_title('Temperature Degree Distribution', fontsize=15)
axes[0].set_xlabel('Temperature Degree',fontsize=15)
axes[0].set_ylabel('Distribution', fontsize=15)
sns.kdeplot(X_1, shade=True, color='g', ax=axes[1]).set_title('Efficiency Distribution', fontsize=15)
axes[1].set_xlabel('Efficiency', fontsize=15)
axes[1].get_yaxis().set_visible(False)
plt.grid(True)
plt.show()
# Showing distribution of Temperature Degrees and Efficiency Rates
f, axes = plt.subplots(ncols=2, figsize=(15,6))
X_0 = lab_df.TemperatureDegree
X_1 = lab_df.Efficiency
sns.distplot(X_0, bins=4, kde=False, color='b', ax=axes[0]).set_title('Temperature Degree Distribution', fontsize=15)
axes[0].set_ylabel('Temperature Degree Count', fontsize=15)
axes[0].set_xlabel('Temperature Degree',fontsize=15)
sns.distplot(X_1 ,bins=4, kde=False, color='g', ax=axes[1]).set_title('Efficiency Distribution', fontsize=15)
axes[1].set_ylabel('Efficiency Count', fontsize=15)
axes[1].set_xlabel('Efficiency', fontsize=15)
plt.grid(True)
plt.show()
/opt/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms).
14/19
0.7368421052631579
The Blue Graph is represented as Temperature Degree Distribution and the Green Graph is represented as Efficiency Rate Distribution. Each Temperature Degree is identified with a certain Efficiency Rate. The highest frequency Degrees are in range 27.35 to 29.15 with Efficiency in range 28.50 to 45.00 and the lowest frequency Efficiency in range 22. to 23.95 with Efficiency in range 81.00 to 98.20.
quality_percent = lab_df['Quality'].value_counts(normalize=True)
quality_percent
Bad 0.789474 Good 0.210526 Name: Quality, dtype: float64
# Showing percent for Bad Quality and Good
plt.figure(figsize=(8,5))
plt.axis([0,2,0,0.85])
X = quality_percent.index
Y = quality_percent
sns.barplot(X, Y, alpha=0.6,palette=['red','blue'])
plt.title('Quality Rate', fontsize=15)
plt.xlabel('Quality', fontsize=15)
plt.ylabel('Rate', fontsize=15)
plt.grid(True)
plt.show()
/opt/anaconda3/lib/python3.8/site-packages/seaborn/_decorators.py:36: FutureWarning: Pass the following variables as keyword args: x, y. From version 0.12, the only valid positional argument will be `data`, and passing other arguments without an explicit keyword will result in an error or misinterpretation.
There are 79% of Laboratories assort as Bad Quality and 21% as Good Quality.
lab_df_floor = lab_df['Floor'].value_counts()
lab_df_floor
FF 13 GF 6 Name: Floor, dtype: int64
# Showing number of Laboratories for each Floor
plt.figure(figsize=(8,5))
plt.axis([0,2,0,13.5])
X = lab_df_floor.index
Y = lab_df_floor
sns.barplot(X, Y , alpha=0.6, palette=['g','b'])
plt.title('Laboratoies Destribution by Floor', fontsize=15)
plt.xlabel('Floor', fontsize=15)
plt.ylabel('Number of Laboratories', fontsize=15)
plt.grid(True)
plt.show()
/opt/anaconda3/lib/python3.8/site-packages/seaborn/_decorators.py:36: FutureWarning: Pass the following variables as keyword args: x, y. From version 0.12, the only valid positional argument will be `data`, and passing other arguments without an explicit keyword will result in an error or misinterpretation.
There are 13 laboratories located in First Floor a and 6 laboratories in Ground Floor.
There is an inversely relational between Efficiency rates and Temperature Degrees. Good Efficiency Rates when Temperature Degrees are less than or equal 25 C. There are 13 laboratories have bad Efficiency Rates and 6 Laboratories have good Efficiency Rates. 68% of laboratories are located on First Floor and 32% in Ground Floor. The Temperature Degrees average is about 26.42 C with Efficiency Rate of 54.24%, this refers to a Bad Rate.
pd.DataFrame.to_csv(lab_df,'My_Own_Project.csv')
##
"""
Created on Fri Sep 4 21:08:12 2020
@author: Abdulaziz Alsulami
This program asks the user to enter a list for Temperature Degrees as inputs,
then calculates the Efficiency Rate for each Temperature Degree and assesses
each Degree according to its Rate as Good or Bad. After that, it displays some
statistical information such as count, mean, standard deviation, menimum,
and maximum values. Finally, it shows some graphs that appear the relationship between
the independent variable 'Temperature Degree' and the dependent variable
'Efficiency Rate', and how many percent of Bad and Good Rates.
"""
# import libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# create TemperatureDegreeEfficiency class
class TemperatureDegreeEfficiency:
def __init__ (self, temp_deg=[]):
"""
Accept one argument as a list of temperature degrees
and store it as a list in a variable is called actual_temp.
"""
# store temperature degrees in actual_temp
self.actual_temp = temp_deg
def _calculating_efficiency(self, id_temp=22, id_eff=100, one_temp=10):
"""
Accept three arguments
id_temp refers to an ideal temperature
id_eff refers to an ideal efficiency
one_temp refers to that each temperature degree is equalied to 10 percent of efficiency
then calculates actual efficiency and store it as a list in a variable is called actual_eff.
"""
# store ideal temperature degree in ideal_temp
self.ideal_temp = id_temp
# store ideal efficiency rates in ideal_eff
self.ideal_eff = id_eff
# store one_temp '10' in one_temp_ten_eff
self.one_temp_ten_eff = one_temp
# set actual_eff with an empty list
self.actual_eff = []
# create formula inside the loop for calculating efficiency rate
# for each temperature degree and store it in actual_eff variable
for temp in self.actual_temp:
self.formula = self.ideal_eff - \
(temp - self.ideal_temp) * self.one_temp_ten_eff
self.actual_eff.append(round(self.formula,2))
# return to actual_eff
return self.actual_eff
def _calculating_quality(self):
"""
Assesses each an efficiency rate if it greater than 70 sorts as Good
and if it less than 70 sorts as Bad then stor them as a list in a variable is called quality.
"""
# filter variable with None value
self.filter = None
# quality variable with empty list
self.quality = []
# assess each an efficiency rate if it greater than 70 sort it as Good
# otherwise as Bad then store them in quality variable
for eff in self.actual_eff:
if eff >= 70:
self.filter = 'Good'
else:
self.filter = 'Bad'
# store them in quality variable
self.quality.append(self.filter)
# return quality variable
return self.quality
def _data_frame(self):
"""
create a variable as a dictionary is called data with three keys and values
first key is called Temperature_Degree consistes list of actual temperature degrees
second key is called Efficiency_Rate contents list of actual efficiency Rates
third key is called Quality contents list of Quality type
then frames this data and store it as a framed data in a variable is called dataset.
"""
# data variable with three lists as values and three keys
data = {
'Temperature_Degree': self.actual_temp,
'Efficiency_Rate': self.actual_eff,
'Quality': self.quality
}
# Create data frame for data variable and store it in dataset variabel
dataset = pd.DataFrame(data, index= np.arange(len(self.actual_temp)))
self.dataset = dataset
# return dataset variable
return self.dataset
# def _display_(self):
# self._good_qul
# self._bad_qul
# print(self._good_qul, '\n')
# print(self._bad_qul, '\n')
def _good_quality(self):
"""
Filtring dataset according to Good quality
"""
good = self.dataset[self.dataset.Quality == 'Good']
txt = 'There are {0} Degrees have Good Quality: '.format(len(good))
print(txt, end='\n')
return good
def _bad_quality(self):
"""
Filtring dataset according to Bad quality
"""
bad = self.dataset[self.dataset.Quality == 'Bad']
txt = 'There are {0} Degrees have Good Quality: '.format(len(bad))
print(txt, end='\n')
return bad
def _statistics(self):
"""
Display statistics for a dataset
"""
self.desc = self.dataset.describe()
return self.desc
def _visulizing_temperature_efficiency(self):
"""
Create a line plot graph that shows the relation between independent variable
'Temperature_Degree' and dependent variable 'Efficiency_Rate'
"""
plt.figure(figsize=(15,5))
X = self.dataset['Temperature_Degree']
Y = self.dataset['Efficiency_Rate']
sns.pointplot(
data=self.dataset.copy(),
x=X,
y=Y,
hue='Quality',
scale=0.8,
color='b',
palette=['red','blue']
)
plt.title('Efficiency vs Temperature Degrees', fontsize=15)
plt.xlabel('Temperature Degrees', fontsize=15)
plt.ylabel('Efficiency', fontsize=15)
plt.legend(loc= 1, fontsize='small')
plt.grid(True)
plt.show()
def _visulizing_quality(self):
"""
Creatae bar plot graph that shows number of Good and Bad quality
"""
quality_percent = self.dataset['Quality'].value_counts(normalize=True)
quality_percent
plt.figure(figsize=(8,5))
plt.axis([0,2,0,0.85])
X = quality_percent.index
Y = quality_percent
sns.barplot(X, Y, alpha=0.6,palette=['red','blue'])
plt.title('Quality Rate', fontsize=15)
plt.xlabel('Quality', fontsize=15)
plt.ylabel('Rate', fontsize=15)
plt.grid(True)
plt.show()
def evaluate_input():
"""
Order from user to enter a list of temperature degrees n the range from 22 to 32 seperated with ','
then evaluated if it pass conditions return to user's input otherwise display message and
return first line of loop.
"""
temp_deg = []
obj = None
instruction = '''
Enter LIST of temperature degrees seprating by commam ',' in the range from 22 to 32
such as [ 22.5, 26 ] or type < temp_degs > for run programm with default temperature degrees or
type < 0 > for exit
'''
message = '''
< {0} > is not valid. Should enter a list of integer or float numbers seperate by comma ',' in range 22 to 32
'''
print(instruction)
cond = True
temp_degs = [
28.3, 27.55, 28.42, 26.81, 25.6, 28.07, 28.24, 29.15,
28.29, 27.65, 24.35, 26.93, 27.04, 26.06, 23.12, 26.06,
22.18, 24.78, 26.34
]
while cond:
# take temperature degrees from user as inputs
user = input('>>> ')
# if user equal 0 go out
if user == '0':
break
# try user values
try:
# evaluate user inputs by remove all comma ','
# and remaine all numbers and store them in obj variable
obj = eval(user)
# accept each number if it is integer or float
# and greater than or equal 22 and less than or equal 32
for number in obj:
if (type(number) is int or type(number) is float) and int(number) >=22 and int(number)<=32:
# store number in temp_deg list
temp_deg.append(number)
# if not raise exception
else:
raise
# if index of obj at the last value go out from while loop
if number == obj[-1]:
cond = False
# print message for user and come back to first line ' user variable'
except:
print(message.format(user))
# return temp_deg if not empty otherwise empty string
return temp_deg if temp_deg != [] else ''
def run_program():
# call evaluate_input function and store its value in lst_temp_degs variable
lst_temp_degs = evaluate_input()
if lst_temp_degs == '':
return leave_comment()
# call class TemperatureDegreeEfficiency and store it in reglab variable
reglab = TemperatureDegreeEfficiency(lst_temp_degs)
# Personal_functins = [func for func in dir(reglab)
# if '__' not in func and '_' in func[0]]
print('List of Temperature Degrees: ', reglab.actual_temp, sep= '\n', end='\n\n')
while True:
#ask user if he want to calculate Efficiency rate type 1 or 0 for exit
message = 'Do you want to calculate the Efficiency rate for each Temperature Degree. \
Type < 1 > for continue or < 0 > for exit'
print(message, '\n')
user = input('>>> ')
# if user type 1 calculate Efficiency rate then break the loop
if user == '1':
print('List of Efficiency Rates: ', reglab._calculating_efficiency(), sep='\n', end='\n\n')
break
# if user type 0 or space return to leav_comment function for exit
elif user == '0' or user =='':
return leave_comment()
# otherwise print error and return first line of the loop
else:
print(f'Invalid value {user}')
#print(message)
while True:
#ask user if he want to calculate Quality types type 1 or 0 for exit
message = 'Do you want to calculate the Quality Types for each Temperature Degree. \
Type < 1 > for continue or < 0 > for exit'
print(message, '\n')
user = input('>>> ')
# if user type 1 calculate Quality type then break the loop
if user == '1':
print('List of Quality Types: ', reglab._calculating_quality(), sep='\n', end='\n\n')
break
# if user type 0 or space return to leav_comment function for exit
elif user == '0' or user =='':
return leave_comment()
# otherwise print error and return first line of the loop
else:
print(f'Invalid value {user}')
#print(message)
while True:
#ask user if he want to calculate Quality types type 1 or 0 for exit
message = 'Do you want to see all data as a table. Type < 1 > for continue or < 0 > for exit'
print(message, '\n')
user = input('>>> ')
# if user type 1 create data frame for Temperature Degrees, Efficiency Rates and Quality Types then break the loop
if user == '1':
print(
'Data Frame for Temperature Degrees, Efficiency Rates and Quality Types: ',
reglab._data_frame(), sep='\n', end='\n\n')
break
# if user type 0 or space return to leav_comment function for exit
elif user == '0' or user =='':
return leave_comment()
# otherwise print error and return first line of the loop
else:
print(f'Invalid value {user}')
#print(message)
while True:
#ask user if he want to see Good Efficiency Rates type 1 or 0 for exit
message = 'Do you want to see Good Efficiency Rates. Type < 1 > for continue or < 0 > for exit'
print(message, '\n')
user = input('>>> ')
# if user type 1 make filter for a data frame to display Good Efficiency Rates then break the loop
if user == '1':
print(reglab._good_quality(), end='\n\n')
break
# if user type 0 or space return to leav_comment function for exit
elif user == '0' or user =='':
return leave_comment()
# otherwise print error and return first line of the loop
else:
print(f'Invalid value {user}')
#print(message)
while True:
#ask user if he want to see Bad Efficiency Rates type 1 or 0 for exit
message = 'Do you want to see Bad Efficiency Rates. Type < 1 > for continue or < 0 > for exit'
print(message, '\n')
user = input('>>> ')
# if user type 1 make filter for a data frame to display Bad Efficiency Rates then break the loop
if user == '1':
print(reglab._bad_quality(), end='\n\n')
break
# if user type 0 or space return to leav_comment function for exit
elif user == '0' or user =='':
return leave_comment()
# otherwise print error and return first line of the loop
else:
print(f'Invalid value {user}')
#print(message)
while True:
# ask user if he want to see some Statistics type 1 or 0 for exit
message = 'Do you want to see some Statistics. Type < 1 > for continue or < 0 > for exit'
print(message, '\n')
user = input('>>> ')
# if user type 1 display some statistics then break the loop
if user == '1':
print('Some Statistics: ', reglab._statistics(), sep='\n', end='\n\n')
break
# if user type 0 or space return to leav_comment function for exit
elif user == '0' or user =='':
return leave_comment()
# otherwise print error and return first line of the loop
else:
print(f'Invalid value {user}')
#print(message)
message = 'Do you want to see some graphs.'
print(message)
while True:
# print messages and graphs as instructions and aks user for type a number of graph
message1 = 'Type the graph number that you would like to see or < all > for all graphs or < 0 > for exit'
print(message1, sep='\n', end='\n')
graph1 = 'Relation between Temperature Degrees and Efficiency Rates: 1'
graph2 = 'Good and Bad Quality Destribution: 2'
print(graph1, graph2, sep='\n')
user = input('>>> ')
# if user type 2 display graph2
if user == '1':
g1 = reglab._visulizing_temperature_efficiency()
# if user type 3 display graph3 and return first line of the loop
elif user == '2':
g2 = reglab._visulizing_quality()
# if user type all display all graphs and return leave_comment function
elif user == 'All'.lower():
g1 = reglab._visulizing_temperature_efficiency()
g1 = reglab._visulizing_quality()
return leave_comment()
# if user type 0 or space return leave_comment function
elif user == '0' or user =='':
return leave_comment()
# otherwise print error and return first line of the loop
else:
print(f'Invalid value {user}')
#print(message)
def leave_comment():
# ask user to leave a comment or type 0 for exit
message = 'Before exit, Leave a comment or type < 0 > for exit: '
user = input(message)
global comment
comment = user
# return message
message = 'Thank you for your use of the program.'
print(message)
if __name__ == '__main__':
run_program()
Enter LIST of temperature degrees seprating by commam ',' in the range from 22 to 32
such as [ 22.5, 26 ] or type < temp_degs > for run programm with default temperature degrees or
type < 0 > for exit
>>> temp_degs
List of Temperature Degrees:
[28.3, 27.55, 28.42, 26.81, 25.6, 28.07, 28.24, 29.15, 28.29, 27.65, 24.35, 26.93, 27.04, 26.06, 23.12, 26.06, 22.18, 24.78, 26.34]
Do you want to calculate the Efficiency rate for each Temperature Degree. Type < 1 > for continue or < 0 > for exit
>>> 1
List of Efficiency Rates:
[37.0, 44.5, 35.8, 51.9, 64.0, 39.3, 37.6, 28.5, 37.1, 43.5, 76.5, 50.7, 49.6, 59.4, 88.8, 59.4, 98.2, 72.2, 56.6]
Do you want to calculate the Quality Types for each Temperature Degree. Type < 1 > for continue or < 0 > for exit
>>> 1
List of Quality Types:
['Bad', 'Bad', 'Bad', 'Bad', 'Bad', 'Bad', 'Bad', 'Bad', 'Bad', 'Bad', 'Good', 'Bad', 'Bad', 'Bad', 'Good', 'Bad', 'Good', 'Good', 'Bad']
Do you want to see all data as a table. Type < 1 > for continue or < 0 > for exit
>>> 1
Data Frame for Temperature Degrees, Efficiency Rates and Quality Types:
Temperature_Degree Efficiency_Rate Quality
0 28.30 37.0 Bad
1 27.55 44.5 Bad
2 28.42 35.8 Bad
3 26.81 51.9 Bad
4 25.60 64.0 Bad
5 28.07 39.3 Bad
6 28.24 37.6 Bad
7 29.15 28.5 Bad
8 28.29 37.1 Bad
9 27.65 43.5 Bad
10 24.35 76.5 Good
11 26.93 50.7 Bad
12 27.04 49.6 Bad
13 26.06 59.4 Bad
14 23.12 88.8 Good
15 26.06 59.4 Bad
16 22.18 98.2 Good
17 24.78 72.2 Good
18 26.34 56.6 Bad
Do you want to see Good Efficiency Rates. Type < 1 > for continue or < 0 > for exit
>>> 1
There are 4 Degrees have Good Quality:
Temperature_Degree Efficiency_Rate Quality
10 24.35 76.5 Good
14 23.12 88.8 Good
16 22.18 98.2 Good
17 24.78 72.2 Good
Do you want to see Bad Efficiency Rates. Type < 1 > for continue or < 0 > for exit
>>> 1
There are 15 Degrees have Good Quality:
Temperature_Degree Efficiency_Rate Quality
0 28.30 37.0 Bad
1 27.55 44.5 Bad
2 28.42 35.8 Bad
3 26.81 51.9 Bad
4 25.60 64.0 Bad
5 28.07 39.3 Bad
6 28.24 37.6 Bad
7 29.15 28.5 Bad
8 28.29 37.1 Bad
9 27.65 43.5 Bad
11 26.93 50.7 Bad
12 27.04 49.6 Bad
13 26.06 59.4 Bad
15 26.06 59.4 Bad
18 26.34 56.6 Bad
Do you want to see some Statistics. Type < 1 > for continue or < 0 > for exit
>>> 1
Some Statistics:
Temperature_Degree Efficiency_Rate
count 19.000000 19.000000
mean 26.575789 54.242105
std 1.891861 18.918607
min 22.180000 28.500000
25% 25.830000 38.450000
50% 26.930000 50.700000
75% 28.155000 61.700000
max 29.150000 98.200000
Do you want to see some graphs.
Type the graph number that you would like to see or < all > for all graphs or < 0 > for exit
Relation between Temperature Degrees and Efficiency Rates: 1
Good and Bad Quality Destribution: 2
>>> 1
Type the graph number that you would like to see or < all > for all graphs or < 0 > for exit Relation between Temperature Degrees and Efficiency Rates: 1 Good and Bad Quality Destribution: 2 >>> 2
/opt/anaconda3/lib/python3.8/site-packages/seaborn/_decorators.py:36: FutureWarning: Pass the following variables as keyword args: x, y. From version 0.12, the only valid positional argument will be `data`, and passing other arguments without an explicit keyword will result in an error or misinterpretation. warnings.warn(
Type the graph number that you would like to see or < all > for all graphs or < 0 > for exit Relation between Temperature Degrees and Efficiency Rates: 1 Good and Bad Quality Destribution: 2 >>> 0 Before exit, Leave a comment or type < 0 > for exit: well done Thank you for your use of the program.